package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Entity;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by sss on 2017/6/16.
 */
@Entity
@javax.persistence.Table(name = "l2r_ipms2_master")
@DynamicInsert
public class L2RIpms2Master extends BaseEntity{
    private Long hotelId;

    private Long hotelGroupId;

    private String l2RNo;

    private String crsNo;

    private Long accnt;

    private Long masterId;

    private String sta;

    private String rsvNo;

    private Date arrDate;

    private Date depDate;

    private BigDecimal nights;

    private String rmNo;

    private String rmNum;

    private String rateSum;

    private String pay;

    private String charge;

    private String awardSta;

    private String commissionSta;

    @Basic
    @javax.persistence.Column(name = "hotel_id", nullable = false, length = 20)
    public Long getHotelId() {
        return hotelId;
    }

    public void setHotelId(Long hotelId) {
        this.hotelId = hotelId;
    }


    @Basic
    @javax.persistence.Column(name = "hotel_group_id", nullable = false, length = 20)
    public Long getHotelGroupId() {
        return hotelGroupId;
    }

    public void setHotelGroupId(Long hotelGroupId) {
        this.hotelGroupId = hotelGroupId;
    }


    @Basic
    @javax.persistence.Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @javax.persistence.Column(name = "crs_no", nullable = true, length = 32)
    public String getCrsNo() {
        return crsNo;
    }

    public void setCrsNo(String crsNo) {
        this.crsNo = crsNo;
    }


    @Basic
    @javax.persistence.Column(name = "accnt", nullable = true, length = 32)
    public Long getAccnt() {
        return accnt;
    }

    public void setAccnt(Long accnt) {
        this.accnt = accnt;
    }

    @Basic
    @javax.persistence.Column(name = "master_id", nullable = true, length = 32)
    public Long getMasterId() {
        return masterId;
    }

    public void setMasterId(Long masterId) {
        this.masterId = masterId;
    }

    @Basic
    @javax.persistence.Column(name = "sta", nullable = true, length = 16)
    public String getSta() {
        return sta;
    }

    public void setSta(String sta) {
        this.sta = sta;
    }

    @Basic
    @javax.persistence.Column(name = "rsv_no", nullable = true, length = 16)
    public String getRsvNo() {
        return rsvNo;
    }

    public void setRsvNo(String rsvNo) {
        this.rsvNo = rsvNo;
    }

    @Basic
    @javax.persistence.Column(name = "arr_date", nullable = true)
    public Date getArrDate() {
        return arrDate;
    }

    public void setArrDate(Date arrDate) {
        this.arrDate = arrDate;
    }

    @Basic
    @javax.persistence.Column(name = "dep_date", nullable = true)
    public Date getDepDate() {
        return depDate;
    }

    public void setDepDate(Date depDate) {
        this.depDate = depDate;
    }

    @Basic
    @javax.persistence.Column(name = "nights", nullable = true, precision = 2)
    public BigDecimal getNights() {
        return nights;
    }

    public void setNights(BigDecimal nights) {
        this.nights = nights;
    }

    @Basic
    @javax.persistence.Column(name = "rm_no", nullable = true, length = 16)
    public String getRmNo() {
        return rmNo;
    }

    public void setRmNo(String rmNo) {
        this.rmNo = rmNo;
    }

    @Basic
    @javax.persistence.Column(name = "rm_num", nullable = true, length = 16)
    public String getRmNum() {
        return rmNum;
    }

    public void setRmNum(String rmNum) {
        this.rmNum = rmNum;
    }

    @Basic
    @javax.persistence.Column(name = "rate_sum", nullable = true, length = 16)
    public String getRateSum() {
        return rateSum;
    }

    public void setRateSum(String rateSum) {
        this.rateSum = rateSum;
    }

    @Basic
    @javax.persistence.Column(name = "pay", nullable = true, length = 16)
    public String getPay() {
        return pay;
    }

    public void setPay(String pay) {
        this.pay = pay;
    }

    @Basic
    @javax.persistence.Column(name = "charge", nullable = true, length = 16)
    public String getCharge() {
        return charge;
    }

    public void setCharge(String charge) {
        this.charge = charge;
    }

    @Basic
    @javax.persistence.Column(name = "award_sta", nullable = true, length = 16)
    public String getAwardSta() {
        return awardSta;
    }

    public void setAwardSta(String awardSta) {
        this.awardSta = awardSta;
    }

    @Basic
    @javax.persistence.Column(name = "commission_sta", nullable = true, length = 16)
    public String getCommissionSta() {
        return commissionSta;
    }

    public void setCommissionSta(String commissionSta) {
        this.commissionSta = commissionSta;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RIpms2Master that = (L2RIpms2Master) o;

        if (hotelId != null ? !hotelId.equals(that.hotelId) : that.hotelId != null) return false;
        if (hotelGroupId != null ? !hotelGroupId.equals(that.hotelGroupId) : that.hotelGroupId != null) return false;
        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (crsNo != null ? !crsNo.equals(that.crsNo) : that.crsNo != null) return false;
        if (accnt != null ? !accnt.equals(that.accnt) : that.accnt != null) return false;
        if (masterId != null ? !masterId.equals(that.masterId) : that.masterId != null) return false;
        if (sta != null ? !sta.equals(that.sta) : that.sta != null) return false;
        if (rsvNo != null ? !rsvNo.equals(that.rsvNo) : that.rsvNo != null) return false;
        if (arrDate != null ? !arrDate.equals(that.arrDate) : that.arrDate != null) return false;
        if (depDate != null ? !depDate.equals(that.depDate) : that.depDate != null) return false;
        if (nights != null ? !nights.equals(that.nights) : that.nights != null) return false;
        if (rmNo != null ? !rmNo.equals(that.rmNo) : that.rmNo != null) return false;
        if (rmNum != null ? !rmNum.equals(that.rmNum) : that.rmNum != null) return false;
        if (rateSum != null ? !rateSum.equals(that.rateSum) : that.rateSum != null) return false;
        if (pay != null ? !pay.equals(that.pay) : that.pay != null) return false;
        if (charge != null ? !charge.equals(that.charge) : that.charge != null) return false;
        if (awardSta != null ? !awardSta.equals(that.awardSta) : that.awardSta != null) return false;
        return commissionSta != null ? commissionSta.equals(that.commissionSta) : that.commissionSta == null;

    }

    @Override
    public int hashCode() {
        int result = hotelId != null ? hotelId.hashCode() : 0;
        result = 31 * result + (hotelGroupId != null ? hotelGroupId.hashCode() : 0);
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (crsNo != null ? crsNo.hashCode() : 0);
        result = 31 * result + (accnt != null ? accnt.hashCode() : 0);
        result = 31 * result + (masterId != null ? masterId.hashCode() : 0);
        result = 31 * result + (sta != null ? sta.hashCode() : 0);
        result = 31 * result + (rsvNo != null ? rsvNo.hashCode() : 0);
        result = 31 * result + (arrDate != null ? arrDate.hashCode() : 0);
        result = 31 * result + (depDate != null ? depDate.hashCode() : 0);
        result = 31 * result + (nights != null ? nights.hashCode() : 0);
        result = 31 * result + (rmNo != null ? rmNo.hashCode() : 0);
        result = 31 * result + (rmNum != null ? rmNum.hashCode() : 0);
        result = 31 * result + (rateSum != null ? rateSum.hashCode() : 0);
        result = 31 * result + (pay != null ? pay.hashCode() : 0);
        result = 31 * result + (charge != null ? charge.hashCode() : 0);
        result = 31 * result + (awardSta != null ? awardSta.hashCode() : 0);
        result = 31 * result + (commissionSta != null ? commissionSta.hashCode() : 0);
        return result;
    }
}
